package com.ftp.web.spider.service;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ThreadPoolService {

    public static void main(String[] args) {
        ExecutorService executorService= Executors.newFixedThreadPool(6);
        for (int i=0;i<10;i++){
            executorService.execute(()->{
                System.out.println("执行:"+Thread.currentThread().getName());
            });
        }

    }
}
